feat: Autonomous ecosystem — Orchestrator, Shield, Health Daemon, Innovation Agent#155
Merged
Merged
Conversation
…vation-agent to PM2 Agent-Logs-Url: https://github.com/ruffy80/ZeusAI/sessions/1019f149-ab44-47c8-b914-678062505c41 Co-authored-by: ruffy80 <29306714+ruffy80@users.noreply.github.com>
…eld/ecosystem Agent-Logs-Url: https://github.com/ruffy80/ZeusAI/sessions/1019f149-ab44-47c8-b914-678062505c41 Co-authored-by: ruffy80 <29306714+ruffy80@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ruffy80
April 13, 2026 20:10
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the four autonomous runtime components described in the problem statement. Three new standalone scripts are added; the existing
auto-innovation-loop.jsis wired as a dedicated PM2 process for the first time.New scripts
scripts/unicorn-main-orchestrator.js—checkRepo()(git fetch, detects new commits/conflicts/missing files) →validateCode()(lint + tests) →deploy()(node deploy-hetzner.js, post-deploy health gate) →rollback()(script + git-reset fallback) →notify()(fire-and-forget HTTP to shield/orchestrator) →orchestrate()loop every 2 minscripts/unicorn-shield.js—watchFiles()(existence + zero-byte check on critical files) →watchProcesses()(ping/api/health+pm2 jlist) →autoRepair()(git checkout -- <file>,pm2 startOrRestart) →emergencyRollback()(notifies orchestrator, runs rollback script) →shieldLoop()every 30 s; triggers rollback after ≥3 consecutive failuresscripts/unicorn-health-daemon.js—checkBackend()(latency + status),checkFrontend()(GET zeusai.pro + /health),checkSSL()(tls.connect, warns at <14 days),checkNginx()(pgrep+nginx -t),checkResources()(CPU load, RAM %, disk % viaos/df),report()(POST to orchestrator),healthLoop()every 60 s (SSL/frontend sampled every 5 cycles)PM2 ecosystem additions
Four new processes in
ecosystem.config.js:unicorn-main-orchestratorscripts/unicorn-main-orchestrator.jsunicorn-shieldscripts/unicorn-shield.jsunicorn-health-daemonscripts/unicorn-health-daemon.jsunicorn-innovation-agentbackend/modules/auto-innovation-loop.js(existing, now standalone)All process-name references in
REPAIR_CMD,SHIELD_REPAIR_CMD, andCRITICAL_PROCESSESare aligned to the actual PM2 names defined in the ecosystem config.